<template>
    <require from="./em-channel-task-item-header.css"></require>
    <div class="em-channel-task-item-header">
        <a class="task-id tms-clipboard" data-clipboard-text="${basePath + '#/chat/' + (isAt ? '@' + taskItem.chatTo.username : channel.name) + '?id=' + taskItem.id}" style="cursor: pointer;" data-tooltip="点击定位消息并复制" data-position="right center" click.delegate="idHandler()">#${taskItem.id}</a>
        <a style="font-size: 12px; margin-left: 8px;" title="更新于${taskItem.updateDate | date}">${taskItem.updateDate | timeago}</a>
        <a if.bind="!isAt" click.delegate="talkHandler()" class="tms-talk" title="任务评论数"><i class="talk outline icon"></i><span class="count" show.bind="taskItem.chatReplies.length > 0">${taskItem.chatReplies.length}</span></a>
        <a click.delegate="stowHandler()" class="tms-task-stow" style="margin-left: 6px;" title="${!taskItem._stowed ? '收藏该任务' : '取消收藏该任务'}"><i class="${!taskItem._stowed ? 'empty' : ''} star link icon"></i></a>
        <a if.bind="taskItem.openEdit || taskItem.creator.username == loginUser.username" click.delegate="editHandler()" class="tms-task-edit" style="margin-left: 6px;" title="编辑任务"><i class="edit link icon"></i></a>
        <span style="float: right;"><em-user-avatar user.bind="taskItem.creator"></em-user-avatar></span>
    </div>
</template>
